package us.gaaoc.framework.signature.visual;

import com.lowagie.text.Element;


/**
 * @todo Move to a DOA
 * 
 * This is a class for determining offsets and text for
 * the court stamp.
 * 
 * @author artripa
 *
 */
public class CourtStampInformation {
	
	private String courtStampText;
	private float y_position;
	private float x_position;
	
	public static float getCVPosition_X(String courtUuid, float pageWidth)
	{
		float x_caseNumber = (pageWidth-20) - 110;
		if(courtUuid.equalsIgnoreCase("courtUuid4"))
		{
			x_caseNumber = (pageWidth-20) - 150;
		}
		return x_caseNumber;
	}
	
	public static float getCVPosition_Y(String courtUuid, float pageHeight)
	{
		float x_caseNumber = (pageHeight-55);

		return x_caseNumber;
	}
	
	public void populate(String courtUuid,float x_stamp,float y_stamp)
	{
		if (courtUuid.equalsIgnoreCase("courtUuidBibb")) {
			courtStampText = "BIBB COUNTY, GEORGIA";
			x_position = x_stamp - 50;
			y_position = y_stamp - 40;
		} else if (courtUuid.equalsIgnoreCase("courtUuid2")) {
			courtStampText = "WASHINGTON COUNTY, GEORGIA";
			x_position = x_stamp - 50;
			y_position = y_stamp - 40;
		} else if (courtUuid.equalsIgnoreCase("courtUuid3")) {
			courtStampText = "DOUGLAS COUNTY, GEORGIA";
			x_position = x_stamp - 50;
			y_position = y_stamp - 40;
		} else if (courtUuid.equalsIgnoreCase("courtUuidHart")) {
			courtStampText = "HART COUNTY, GEORGIA";
			x_position = x_stamp - 50;
			y_position = y_stamp - 40;
		} else if (courtUuid.equalsIgnoreCase("courtUuidJefferson")) {
			courtStampText = "JEFFERSON COUNTY, GEORGIA";
			x_position = x_stamp - 50;
			y_position = y_stamp - 40;
		}else if (courtUuid.equalsIgnoreCase("courtUuid5")) {
			courtStampText = "OGLETHORPE COUNTY, GEORGIA";
			x_position = x_stamp - 50;
			y_position = y_stamp - 40;
		}else if (courtUuid.equalsIgnoreCase("courtUuidLee")) {
			courtStampText = "LEE COUNTY, GEORGIA";
			x_position = x_stamp - 50;
			y_position = y_stamp - 60;		
		}else if (courtUuid.equalsIgnoreCase("courtUuidSchley")) {
			courtStampText = "Schley COUNTY, GEORGIA";
			x_position = x_stamp - 50;
			y_position = y_stamp - 60;		
			y_position = y_stamp - 40;		
		}else if (courtUuid.equalsIgnoreCase("courtUuidMacon")) {
			courtStampText = "MACON COUNTY, GEORGIA";
			x_position = x_stamp - 50;
			y_position = y_stamp - 40;	
		}else if (courtUuid.equalsIgnoreCase("courtUuidChatham")) {
			courtStampText = "CHATHAM COUNTY, GEORGIA";
			x_position = x_stamp - 50;
			y_position = y_stamp - 40;
		}else if (courtUuid.equalsIgnoreCase("courtUuidCoweta")) {
				courtStampText = "COWETA COUNTY, GEORGIA";
				x_position = x_stamp - 50;
				y_position = y_stamp - 40;
		}else if (courtUuid.equalsIgnoreCase("courtUuid4")) {
//			courtStampText = "Fulton COUNTY, GEORGIA";
			x_position = x_stamp - 50;
			y_position = y_stamp - 40;
		}else{
				//TODO: query the name from the database
				//TODO: query the x_stamp/y_stamp location from the database
			courtStampText = "<UNKNOWN> COUNTY, GEORGIA";
			x_position = x_stamp - 50;
			y_position = y_stamp - 40;
		}
	}

	public String getCourtStampText() {
		return courtStampText;
	}

	public float getY_position() {
		return y_position;
	}

	public float getX_position() {
		return x_position;
	}
}
